//统一管理咱们项目用户相关的接口
import request from '@/utils/axios'
//引入数据类型
import type { loginForm, loginToken, dataObj } from './type'
// 统一管理接口
enum API {
  LOGIN_URL = '/admin/acl/index/login',
  USERINFO_URL = '/admin/acl/index/info',
  LOGOUT_URL = '/admin/acl/index/logout',
}
// 暴露请求函数
// 登录接口方法
export const reqLogin = (data: loginForm) =>
  request.post<any, loginToken>(API.LOGIN_URL, data)
export const reqUserInfo = () => request.get<any, dataObj>(API.USERINFO_URL)
export const reqLogOut = () => request.post<any, any>(API.LOGOUT_URL)
